package com.example.clsj.organization;

import cn.hutool.core.util.StrUtil;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class Worker extends Employee {


    public Worker(String name, int id) {
        super(name, id);
    }

    @Override
    public void display(int depth) {
        log.info(StrUtil.repeat(' ', depth * 2) + "Worker: " + getName() + ", ID: " + getId());
    }

    @Override
    public int countEmployees() {
        return 1; // Only count the worker itself
    }

    @Override
    public double calculateTotalSalary() {
        return 5000; // Assume a fixed salary for workers
    }
}
